home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / cnet / Brain.lha / Brain next >
Text File  |  1996-12-21  |  20KB  |  551 lines

  1. /*************************************************************************/
  2. /*                   Brain v1.0 for CNet  by Morpheus                    */
  3. /*         This game is a conversion of the E! door BrainE! v1.0         */
  4. /*************************************************************************/
  5. path='pfiles:Brain/'
  6. /*************************************************************************/
  7. options results
  8. temp=right(path,1)
  9. if temp~='/'&temp~=':' then path=path||'/'
  10. bbsidentify term
  11. maxlines=word(result,2)
  12. if maxlines<30 then setlength 30
  13. bbsidentify SYSOP
  14. sysop=result
  15. tr=transmit
  16. sn=sendstring
  17. gc=getchar
  18. cp5=copies(' ',5)
  19. cp12=copies(' ',12)
  20. cp15=copies(' ',15)
  21. cp25=copies(' ',25)
  22. level=1
  23. x_tot=4
  24. y_tot=3
  25. totaal=12
  26. call read_hiscore(1)
  27. call show_header
  28. choice=0
  29. do while choice~=4
  30. call show_main
  31. call check_carrier
  32. gc
  33. choice=result
  34. sn choice
  35. select
  36. when choice=0 then call new_game
  37. when choice=1 then call show_instr
  38. when choice=2 then;do
  39. call show_hiscore
  40. sn cp25||'Press c2<c3Enterc2> c3to continue! '
  41. call check_carrier
  42. gc
  43. end
  44. when choice=3 then call change_level
  45. otherwise nop
  46. end
  47. end
  48. call quit_game
  49. exit
  50. new_game:
  51. do while invoer~='M'
  52. invoer='R'
  53. cont=1
  54. call clr(9)
  55. sn '1H'||cp15||'   c3Please wait... Setting up a new game: c7'
  56. call gen_veld
  57. sn 'c2Done!w1'
  58. do while cont=1
  59. if invoer='R' then;do
  60. call show_veld
  61. do i=1 for totaal
  62. input.i=0
  63. end
  64. move=0
  65. time('R')
  66. end
  67. call check_carrier
  68. gc
  69. invoer=result
  70. if invoer='1B'x then;do
  71. checkio
  72. if result='1' then;do
  73. gc;gc
  74. invoer=result
  75. if invoer='A' then invoer='8'
  76. if invoer='B' then invoer='2'
  77. if invoer='C' then invoer='6'
  78. if invoer='D' then invoer='4'
  79. end
  80. else invoer='M'
  81. end
  82. else if invoer='D'x|invoer='5'|invoer=' ' then invoer='0'
  83. else invoer=upper(invoer)
  84. select
  85. when invoer='C' then;do
  86. call change_level
  87. cont=0
  88. end
  89. when invoer='N' then cont=0
  90. when invoer='Q' then call quit_game
  91. when invoer='M' then cont=0
  92. when invoer='0' then;do
  93. if input.nr=0 then;do
  94. move=move+1
  95. input.nr=1
  96. sn apos(y+1,x+1)||col(input.nr)
  97. if nr>x_tot then;do
  98. temp=nr-x_tot
  99. if input.temp>0 then;do
  100. input.temp=1+(input.temp//4)
  101. sn apos(y-3,x+1)||col(input.temp)
  102. end
  103. end
  104. if nr<=(totaal-x_tot) then;do
  105. temp=nr+x_tot
  106. if input.temp>0 then;do
  107. input.temp=1+(input.temp//4)
  108. sn apos(y+5,x+1)||col(input.temp)
  109. end
  110. end
  111. if (nr//x_tot)~=1 then;do
  112. temp=nr-1
  113. if input.temp>0 then;do
  114. input.temp=1+(input.temp//4)
  115. sn apos(y+1,x-3)||col(input.temp)
  116. end
  117. end
  118. if (nr//x_tot)~=0 then;do
  119. temp=nr+1
  120. if input.temp>0 then;do
  121. input.temp=1+(input.temp//4)
  122. sn apos(y+1,x+5)||col(input.temp)
  123. end
  124. end
  125. end
  126. end
  127. when invoer='8' then;do
  128. if y>11 then;do
  129. sn cursor(y,x,7)
  130. y=y-4
  131. sn cursor(y,x,3)
  132. nr=nr-x_tot
  133. end
  134. end
  135. when invoer='2' then;do
  136. if y<(11+(y_tot-1)*4) then;do
  137. sn cursor(y,x,7)
  138. y=y+4
  139. sn cursor(y,x,3)
  140. nr=nr+x_tot
  141. end
  142. end
  143. when invoer='4' then;do
  144. if x>45 then;do
  145. sn cursor(y,x,7)
  146. x=x-4
  147. sn cursor(y,x,3)
  148. nr=nr-1
  149. end
  150. end
  151. when invoer='6' then;do
  152. if x<(45+(x_tot-1)*4) then;do
  153. sn cursor(y,x,7)
  154. x=x+4
  155. sn cursor(y,x,3)
  156. nr=nr+1
  157. end
  158. end
  159. otherwise nop
  160. end
  161. sn apos(8,49)
  162. if move=totaal then;do
  163. sn cursor(y,x,7)||'w1'
  164. i=1
  165. correct=1
  166. do while i<=totaal
  167. if input.i~=veld.i then correct=0
  168. i=i+1
  169. end
  170. if correct=1 then;do
  171. score=time('E')
  172. score=delstr(score,length(score)-2,3)
  173. if score<10 then score=10
  174. if score>999 then score=999
  175. cont=0
  176. if length(score)=2 then string1=' º        c7in '||score||' seconds!        c3º '
  177. else string1=' º       c7in '||score||' seconds!!       c3º '
  178. if score<score.10 then string2=' º  c7You have a top ten score!!  c3º '
  179. else string2=' º     c7Sorry, no highscore!     c3º '
  180. tr apos(14,22)||copies(' ',34)
  181. tr apos(15,22)||' c3ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» '
  182. tr apos(16,22)||' º                              º '
  183. tr apos(17,22)||' º       c7YES! You did it!       c3º '
  184. tr apos(18,22)||' º                              º '
  185. tr apos(19,22)||' º  c7You have solved the puzzle  c3º '
  186. tr apos(20,22)||' º                              º '
  187. tr apos(21,22)||string1
  188. tr apos(22,22)||' º                              º '
  189. tr apos(23,22)||string2
  190. tr apos(24,22)||' º                              º '
  191. tr apos(25,22)||' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ '
  192. tr apos(26,22)||copies(' ',34)
  193. call clr(27)
  194. sn 'n1'||cp25||'Press c2<c3Enterc2> c3to continue! '
  195. if score<score.10 then;do
  196. call write_hiscore
  197. call check_carrier
  198. gc
  199. new_hiscore=1
  200. call show_hiscore
  201. new_hiscore=0
  202. sn cp25||'Press c2<c3Enterc2> c3to continue! '
  203. end
  204. end
  205. else;do
  206. tr apos(14,21)||copies(' ',37)
  207. tr apos(15,21)||' c3ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» '
  208. tr apos(16,21)||' º                                 º '
  209. tr apos(17,21)||' º    c7Sorry, you did NOT solve     c3º '
  210. tr apos(18,21)||' º                                 º '
  211. tr apos(19,21)||' º           c7the puzzle!!          c3º '
  212. tr apos(20,21)||' º                                 º '
  213. tr apos(21,21)||' º  c7Press c3<c7Rc3> c7to retry this game,  c3º '
  214. tr apos(22,21)||' º                                 º '
  215. tr apos(23,21)||' º   c7or c3<c7Nc3> c7to start a new game.   c3º '
  216. tr apos(24,21)||' º                                 º '
  217. tr apos(25,21)||' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ '
  218. tr apos(26,21)||copies(' ',37)
  219. sn apos(8,49)
  220. end
  221. call check_carrier
  222. gc
  223. temp=upper(result)
  224. select
  225. when temp='Q' then call quit_game
  226. when temp='M' then;do
  227. invoer='M'
  228. cont=0
  229. end
  230. when temp='R'&cont=1 then invoer='R'
  231. when temp='C' then;do
  232. call change_level
  233. cont=0
  234. end
  235. otherwise cont=0
  236. end
  237. end
  238. end
  239. end
  240. invoer=0
  241. return
  242. read_hiscore:
  243. if ~open('HiScore',path||'Brain_'||arg(1)||'.data','R') then;do
  244. if ~open('HiScore',path||'Brain_'||arg(1)||'.data','W') then;do
  245. call clr(1)
  246. tr 'c7Error: Could not create new highscore file for level '||arg(1)||'!'
  247. tr '       Please notify the sysop.w5'
  248. call quit_game
  249. end
  250. do i=1 for 10
  251. alias.i=sysop
  252. writeln('HiScore',alias.i)
  253. score.i=989+i
  254. writeln('HiScore',score.i)
  255. end
  256. close('HiScore')
  257. end
  258. else;do
  259. do i=1 for 10
  260. alias.i=readln('HiScore')
  261. score.i=readln('HiScore')
  262. end
  263. close('HiScore')
  264. end
  265. return
  266. write_hiscore:
  267. i=1
  268. do while i<=10
  269. if score<score.i then;do
  270. j=10
  271. do while j>i
  272. k=j-1
  273. score.j=score.k
  274. alias.j=alias.k
  275. j=j-1
  276. end
  277. score.i=score
  278. getuser 1
  279. alias.i=result
  280. player=i
  281. i=10
  282. end
  283. i=i+1
  284. end
  285. if ~open('HiScore',path||'Brain_'||level||'.data','W') then;do
  286. call clr(1)
  287. tr 'c7Error: Could not write to highscore file of level '||level||'!'
  288. tr '       Please notify the sysop.w5'
  289. call quit_game
  290. end
  291. do i=1 for 10
  292. writeln('HiScore',alias.i)
  293. writeln('HiScore',score.i)
  294. end
  295. close('HiScore')
  296. return
  297. show_veld:
  298. call clr(9)
  299. y=11
  300. x=45
  301. nr=1
  302. select
  303. when level=1 then;do
  304. tr '1H'||cp15||' c2ÉÍÍÍËÍÍÍËÍÍÍËÍÍÍ»          c4ÉÍÍÍËÍÍÍËÍÍÍËÍÍÍ»'
  305. tr cp15||' c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º          c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  306. tr cp15||' c2ºc7³'||col(veld.1)||'³c2ºc7³'||col(veld.2)||'³c2ºc7³'||col(veld.3)||'³c2ºc7³'||col(veld.4)||'³c2º          c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  307. tr cp15||' c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º          c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  308. tr cp15||' c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹          c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  309. tr cp15||' c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º          c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  310. tr cp15||' c2ºc7³'||col(veld.5)||'³c2ºc7³'||col(veld.6)||'³c2ºc7³'||col(veld.7)||'³c2ºc7³'||col(veld.8)||'³c2º          c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  311. tr cp15||' c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º          c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  312. tr cp15||' c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹          c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  313. tr cp15||' c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º          c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  314. tr cp15||' c2ºc7³'||col(veld.9)||'³c2ºc7³'||col(veld.10)||'³c2ºc7³'||col(veld.11)||'³c2ºc7³'||col(veld.12)||'³c2º          c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  315. tr cp15||' c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º          c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  316. tr cp15||' c2ÈÍÍÍÊÍÍÍÊÍÍÍÊÍÍͼ          c4ÈÍÍÍÊÍÍÍÊÍÍÍÊÍÍͼ'
  317. end
  318. when level=2 then;do
  319. tr '1H'||cp12||'c2ÉÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍ»          c4ÉÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍ»'
  320. tr cp12||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º          c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  321. tr cp12||'c2ºc7³'||col(veld.1)||'³c2ºc7³'||col(veld.2)||'³c2ºc7³'||col(veld.3)||'³c2ºc7³'||col(veld.4)||'³c2ºc7³'||col(veld.5)||'³c2º          c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  322. tr cp12||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º          c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  323. tr cp12||'c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹          c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  324. tr cp12||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º          c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  325. tr cp12||'c2ºc7³'||col(veld.6)||'³c2ºc7³'||col(veld.7)||'³c2ºc7³'||col(veld.8)||'³c2ºc7³'||col(veld.9)||'³c2ºc7³'||col(veld.10)||'³c2º          c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  326. tr cp12||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º          c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  327. tr cp12||'c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹          c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  328. tr cp12||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º          c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  329. tr cp12||'c2ºc7³'||col(veld.11)||'³c2ºc7³'||col(veld.12)||'³c2ºc7³'||col(veld.13)||'³c2ºc7³'||col(veld.14)||'³c2ºc7³'||col(veld.15)||'³c2º          c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  330. tr cp12||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º          c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  331. tr cp12||'c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹          c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  332. tr cp12||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º          c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  333. tr cp12||'c2ºc7³'||col(veld.16)||'³c2ºc7³'||col(veld.17)||'³c2ºc7³'||col(veld.18)||'³c2ºc7³'||col(veld.19)||'³c2ºc7³'||col(veld.20)||'³c2º          c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  334. tr cp12||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º          c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  335. tr cp12||'c2ÈÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍͼ          c4ÈÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍͼ'
  336. end
  337. when level=3 then;do
  338. tr '1H'||cp5||'c2ÉÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍ»         c4ÉÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍËÍÍÍ»'
  339. tr cp5||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º         c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  340. tr cp5||'c2ºc7³'||col(veld.1)||'³c2ºc7³'||col(veld.2)||'³c2ºc7³'||col(veld.3)||'³c2ºc7³'||col(veld.4)||'³c2ºc7³'||col(veld.5)||'³c2ºc7³'||col(veld.6)||'³c2ºc7³'||col(veld.7)||'³c2º         c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  341. tr cp5||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º         c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  342. tr cp5||'c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹         c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  343. tr cp5||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º         c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  344. tr cp5||'c2ºc7³'||col(veld.8)||'³c2ºc7³'||col(veld.9)||'³c2ºc7³'||col(veld.10)||'³c2ºc7³'||col(veld.11)||'³c2ºc7³'||col(veld.12)||'³c2ºc7³'||col(veld.13)||'³c2ºc7³'||col(veld.14)||'³c2º         c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  345. tr cp5||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º         c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  346. tr cp5||'c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹         c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  347. tr cp5||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º         c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  348. tr cp5||'c2ºc7³'||col(veld.15)||'³c2ºc7³'||col(veld.16)||'³c2ºc7³'||col(veld.17)||'³c2ºc7³'||col(veld.18)||'³c2ºc7³'||col(veld.19)||'³c2ºc7³'||col(veld.20)||'³c2ºc7³'||col(veld.21)||'³c2º         c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  349. tr cp5||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º         c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  350. tr cp5||'c2ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹         c4ÌÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍÍÎÍÍ͹'
  351. tr cp5||'c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2ºc7ÚÄ¿c2º         c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4ºc7ÚÄ¿c4º'
  352. tr cp5||'c2ºc7³'||col(veld.22)||'³c2ºc7³'||col(veld.23)||'³c2ºc7³'||col(veld.24)||'³c2ºc7³'||col(veld.25)||'³c2ºc7³'||col(veld.26)||'³c2ºc7³'||col(veld.27)||'³c2ºc7³'||col(veld.28)||'³c2º         c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4ºc7³ ³c4º'
  353. tr cp5||'c2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2ºc7ÀÄÙc2º         c4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4ºc7ÀÄÙc4º'
  354. tr cp5||'c2ÈÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍͼ         c4ÈÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍÍÊÍÍͼ'
  355. end
  356. end
  357. tr 'n1        c3Rc2=c3Retry    Nc2=c3New    Cc2=c3Change Level    Mc2=c3Main Menu    Qc2=c3Quit'
  358. sn 'n1          Use Cursorkeys To Move Cursor   Press c2<c3Enterc2> c3To Select'
  359. sn cursor(y,x,3)||apos(8,49)
  360. return
  361. col:
  362. select
  363. when arg(1)=1 then temp=1
  364. when arg(1)=2 then temp=3
  365. when arg(1)=3 then temp=5
  366. when arg(1)=4 then temp=6
  367. otherwise temp=7
  368. end
  369. return 'c'||temp||arg(1)||'c7'
  370. show_instr:
  371. call clr(9)
  372. tr 'c3n2   BrainE! is based on the Logo-clone Brain (written by Andre Wichmann).n1'
  373. tr '   The purpose of the game is  to reproduce a randomly  generated pattern'
  374. tr '   by selecting the right squares in the right order.  When you select an'
  375. tr '   empty square all non-empty neighbours will be incremented by one.  The'
  376. tr '   numbers in the squares range from one to four.  When a square with the'
  377. tr '   number  four  is  incremented  it will become a square with the number'
  378. tr '   one.n1'
  379. tr '   Take a look at the following example which shows what happens when you'
  380. tr '   select the square  B2  :n2'
  381. sn cp25||'Press c2<c3Enterc2> c3to continue! '
  382. call check_carrier
  383. gc
  384. call clr(9)
  385. tr 'n2c7                       A B C D                   A B C D'
  386. tr '                      c4ÚÄÂÄÂÄÂÄ¿                 ÚÄÂÄÂÄÂÄ¿'
  387. tr '                    c71 c4³c11c4³c53c4³c11c4³ ³               c71 c4³c11c4³c64c4³c11c4³ ³'
  388. tr '                      c4ÃÄÅÄÅÄÅÄ´     c3 B2         c4ÃÄÅÄÅÄÅÄ´'
  389. tr '                    c72 c4³c32c4³ ³c64c4³c11c4³     c7ÍÍÍÍ>     2 c4³c53c4³c11c4³c11c4³c11c4³'
  390. tr '                      c4ÃÄÅÄÅÄÅÄ´                 ÃÄÅÄÅÄÅÄ´'
  391. tr '                    c73 c4³c32c4³ ³c11c4³ ³               c73 c4³c32c4³ ³c11c4³ ³'
  392. tr '                      c4ÀÄÁÄÁÄÁÄÙ                 ÀÄÁÄÁÄÁÄÙn1'
  393. tr 'c3   As you can  see only  three of its four direct neighbours  change when'
  394. tr '   you  select   B2 .   The squares that are diagonally next to  B2  (A1,'
  395. tr '   C1, A3, C3) are not considered as neighbours of  B2  and are therefore'
  396. tr '   not  incremented.   The  neighbour   B3  is empty so that square isn t'
  397. tr '   incremented either!n2'
  398. sn cp25||'Press c2<c3Enterc2> c3to continue! '
  399. call check_carrier
  400. gc
  401. call clr(9)
  402. tr 'n2   When you have correctly reproduced the randomly generated pattern, the'
  403. tr '   time needed  to solve  the puzzle will  be showed.  Your  name will be'
  404. tr '   added to the highscore-list when you have a top ten score!n1'
  405. tr '   The game is  actually quite simple. Just play a few games and you will'
  406. tr '   see this for yourself.n1'
  407. tr '   You  can  select  three  different  levels  of  difficulty.   The only'
  408. tr '   difference  between  these three levels is the size of the grid.  Each'
  409. tr '   level has its own highscore-list.n1'
  410. tr '                               Enjoy the game!n2'
  411. sn cp25||'Press c2<c3Enterc2> c3to continue! '
  412. call check_carrier
  413. gc
  414. return
  415. show_hiscore:
  416. call clr(9)
  417. tr 'n1'||cp15||'c3    z2ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·z0'
  418. tr cp15||'    z2º z0                                  z2 ºz0'
  419. tr cp15||'    z2º z0        H I G H S C O R E S       z2 ºz0'
  420. tr cp15||'    z2º z0                                  z2 ºz0'
  421. tr cp15||'    z2º z0            L E V E L  '||level||'          z2 ºz0'
  422. tr cp15||'    z2º z0                                  z2 ºz0'
  423. tr cp15||'    z2ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶz0'
  424. tr cp15||'    z2º z0                                  z2 ºz0'
  425. do i=1 for 10
  426. if new_hiscore=1&i=player then kleur='c7'
  427. else kleur='c3'
  428. tr cp15||'    z2º z0'||kleur||right(i,3)||'. '||left(alias.i,25,'.')||right(score.i,3)||' z2c3 ºz0'
  429. end
  430. tr cp15||'    z2º z0                                  z2 ºz0'
  431. tr cp15||'    z2ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽz0n1'
  432. return
  433. show_main:
  434. call clr(9)
  435. tr '1H'||cp25||'c2ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·'
  436. tr cp25||'º    M A I N   M E N U    º'
  437. tr cp25||'ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ'
  438. tr cp25||'º 0. c3Start Game c2(level '||level||') c2º'
  439. tr cp25||'º 1. c3Show Instructions    c2º'
  440. tr cp25||'º 2. c3Show Highscores      c2º'
  441. tr cp25||'º 3. c3Change Level         c2º'
  442. tr cp25||'º 4. c3Quit Game            c2º'
  443. tr cp25||'ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ'
  444. tr cp25||'º     Make a choice:      º'
  445. tr cp25||'ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽc3'
  446. sn '47H'
  447. return
  448. show_header:
  449. tr 'f1@6'
  450. tr cp15||'c3ÛÛÛÛÛÛc7¿ c3ÛÛÛÛÛÛc7¿  c3ÛÛÛÛÛc7¿ c3ÛÛc7¿c3ÛÛÛc7¿ c3ÛÛc7¿c3ÛÛÛÛÛÛÛc7¿c3ÛÛc7¿'
  451. tr cp15||'c3z2²²c7z0ÚÄÄc3z2²²c7z0¿c3z2²²c7z0ÚÄÄc3z2²²c7z0¿c3z2²²c7z0ÚÄÄc3z2²²c7z0¿c3z2²²c7z0³c3z2²²²²c7z0¿c3z2²²c7z0³c3z2²²c7z0ÚÄÄÄÄÙc3z2²²c7z0³'
  452. tr cp15||'c3z2±±±±±±c7z0ÚÙc3z2±±±±±±c7z0ÚÙc3z2±±±±±±±c7z0³c3z2±±c7z0³c3z2±±c7z0Úc3z2±±±±c7z0³c3z2±±±±±c7z0¿  c3z2±±c7z0³'
  453. tr cp15||'c3z2°°c7z0ÚÄÄc3z2°°c7z0¿c3z2°°c7z0Úc3z2°°c7z0ÚÙ c3z2°°c7z0ÚÄÄc3z2°°c7z0³c3z2°°c7z0³c3z2°°c7z0³Àc3z2°°°c7z0³c3z2°°c7z0ÚÄÄÙ  ÀÄÙ'
  454. tr cp15||'z2      z0ÚÙz2  z0³Àz2  z0¿ z2  z0³  z2  z0³z2  z0³z2  z0³ Àz2  z0³z2       z0¿z2  z0¿'
  455. tr cp15||'ÀÄÄÄÄÄÙ ÀÄÙ ÀÄÙ ÀÄÙ  ÀÄÙÀÄÙÀÄÙ  ÀÄÙÀÄÄÄÄÄÄÙÀÄÙ'
  456. tr cp5||cp25||'c3v1.0  by Morpheus'
  457. return
  458. change_level:
  459. call clr(9)
  460. tr '1H'||cp25||'  c2ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·'
  461. tr cp25||'  º    Change Level    º'
  462. tr cp25||'  ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ'
  463. tr cp25||'  º 1. c3Level 1 (4 x 3) c2º'
  464. tr cp25||'  º 2. c3Level 2 (5 x 4) c2º'
  465. tr cp25||'  º 3. c3Level 3 (7 x 4) c2º'
  466. tr cp25||'  ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ'
  467. tr cp25||'  º  Make a choice:    º'
  468. tr cp25||'  ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽc3'
  469. sn '46H'
  470. call check_carrier
  471. gc
  472. temp=result
  473. sn temp
  474. select
  475. when temp=1 then;do
  476. level=1
  477. x_tot=4
  478. y_tot=3
  479. totaal=12
  480. end
  481. when temp=2 then;do
  482. level=2
  483. x_tot=5
  484. y_tot=4
  485. totaal=20
  486. end
  487. when temp=3 then;do
  488. level=3
  489. x_tot=7
  490. y_tot=4
  491. totaal=28
  492. end
  493. otherwise nop
  494. end
  495. call read_hiscore(level)
  496. return
  497. gen_veld:
  498. do i=1 for totaal
  499. veld.i=0
  500. end
  501. i=1
  502. do while i<=totaal
  503. nr=1+rnd(totaal)
  504. if veld.nr=0 then;do
  505. j=i//4
  506. select
  507. when j=0 then sn '|<1'
  508. when j=1 then sn '/<1'
  509. when j=2 then sn '-<1'
  510. when j=3 then sn '\<1'
  511. end
  512. veld.nr=1
  513. i=i+1
  514. if nr>x_tot then;do
  515. temp=nr-x_tot
  516. if veld.temp>0 then veld.temp=1+(veld.temp//4)
  517. end
  518. if nr<=(totaal-x_tot) then;do
  519. temp=nr+x_tot
  520. if veld.temp>0 then veld.temp=1+(veld.temp//4)
  521. end
  522. if (nr//x_tot)~=1 then;do
  523. temp=nr-1
  524. if veld.temp>0 then veld.temp=1+(veld.temp//4)
  525. end
  526. if (nr//x_tot)~=0 then;do
  527. temp=nr+1
  528. if veld.temp>0 then veld.temp=1+(veld.temp//4)
  529. end
  530. end
  531. end
  532. return
  533. rnd:
  534. return (random(1,100,time(s))+random(1,100,time(s))+random(1,100,time(s)))//arg(1)
  535. check_carrier:
  536. getcarrier
  537. if result='FALSE' then exit
  538. return
  539. quit_game:
  540. bbsidentify name
  541. bbsname=result
  542. sn 'f1n3c2'center('Returning to '||bbsname||'...',78)||'n1w1q1'
  543. setlength maxlines
  544. exit
  545. clr:
  546. sn ''arg(1)'H'
  547. return
  548. apos:
  549. return ''arg(1)';'arg(2)'H'
  550. cursor:
  551. return ''arg(1)';'arg(2)'Hc'arg(3)'ÚÄ¿!1<3³>1³!1<3ÀÄÙ'